#!/usr/bin/env python
# -*- coding: utf-8 -*-
import asyncio
import aiohttp


def get_urls():
    return ['https://www.stephenw.cc/2017/06/11/objc-block/',
            'https://www.stephenw.cc/2017/06/11/objc-block/',
            'https://aiohttp.readthedocs.io/en/stable/client_quickstart.html',
            'http://httpbin.org/get',
            'https://stackoverflow.com/questions/53486744/making-async-for-loops-in-python']


async def main(url):
    async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(ssl=False)) as session:
        print("url get --> {0}".format(url))
        async with session.get(url) as response:
            html = await response.text()
            print("get resposet --> {0}".format(url))


async def run_async():
    tasks = []
    for url in get_urls():
        tasks.append(main(url))
    await asyncio.gather(*tasks)


if __name__ == '__main__':
    asyncio.run(run_async())
